package org.budo.beetl;

import java.io.InputStream;

import org.beetl.core.ByteWriter;
import org.budo.support.lang.util.IoUtil;

/**
 * @author limingwei
 */
public class Beetl {
    public static void writeString(ByteWriter byteWriter, String content) {
        try {
            byteWriter.writeString(content);
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
    }

    public static void write(ByteWriter byteWriter, InputStream inputStream) {
        String content = IoUtil.toString(inputStream);
        writeString(byteWriter, content);
    }
}